package com.itheima.hashset;

import com.itheima.domain.Student;

/*
对象的hash值介绍

 */
public class Demo03 {
    public static void main(String[] args) {
        Student student = new Student();
        System.out.println(student.hashCode());//0
        Student zhang3 = new Student("张三3", 31);
        Student zhang = new Student("张三", 31);
        Student zhang2 = new Student("张三2", 31);
        System.out.println(zhang.hashCode());//793589513
        System.out.println(zhang.hashCode());//793589513
        System.out.println(zhang2.hashCode());//1313922862
        System.out.println(zhang2.hashCode());//1313922862
        System.out.println(zhang3.hashCode());//1313922862
        System.out.println(zhang3.hashCode());//1313922862

        for (;;){}
    }
}
